/* ==========================================================================
   SYSTEM ACTIVATION PROMPT MODAL STYLES
   ========================================================================== */
.modal-backdrop.show {
    backdrop-filter: blur(8px);
    background-color: rgba(31, 58, 95, 0.75);
}

.activation-modal-content {
    background: var(--white);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    padding: 1rem 0.5rem;
}

.activation-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-navy), var(--accent-teal));
}

.activation-icon-box {
    width: 52px;
    height: 52px;
    background: rgba(31, 58, 95, 0.08);
    color: var(--primary-navy);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.font-label {
    color: var(--primary-navy);
    font-size: 0.88rem;
    margin-bottom: 6px;
}

.custom-input-group .input-group-text {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: var(--primary-navy);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    padding-left: 14px;
    padding-right: 14px;
}

.custom-input-group .form-control {
    border-color: #e2e8f0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 10px 14px;
    font-size: 0.92rem;
    color: #1e293b;
    transition: all 0.3s ease;
}

.custom-input-group .form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

.py-2-5 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.btn-activate, .btn-activate-confirm {
    background: linear-gradient(135deg, var(--primary-navy), #254a7c);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(31, 58, 95, 0.25);
}

.btn-activate:hover, .btn-activate-confirm:hover {
    background: linear-gradient(135deg, var(--accent-teal), #138496);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(23, 162, 184, 0.35);
}

.btn-activate:active, .btn-activate-confirm:active {
    transform: translateY(0);
}

/* Responsiveness Safeguards */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.75rem;
    }
    .activation-modal-content {
        padding: 0.5rem 0.2rem;
    }
    .modal-header h4 {
        font-size: 1.15rem;
    }
    .activation-icon-box {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   ENHANCED BACKGROUND BLUR FOR ACTIVATION MODAL
   ========================================================================== */

/* 1. Ginagawang blurred at dark overlay ang mismong backdrop ng Bootstrap */
.modal-backdrop.show {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background-color: rgba(15, 28, 48, 0.82) !important; /* Mas madilim para hindi masilip ang content */
    opacity: 1 !important;
}

/* 2. Kusa nitong iblu-blur ang buong background (Navbar & Modules) kapag bukas ang modal */
body.modal-open .custom-navbar,
body.modal-open .module-grid {
    -webkit-filter: blur(10px) grayscale(30%);
    filter: blur(10px) grayscale(30%);
    pointer-events: none; /* Iniiwasan ang anumang click o scroll sa background */
    user-select: none;   /* Pinipigilan ang pag-highlight / highlight ng text sa likod */
    transition: filter 0.3s ease;
}

/* 3. Siguraduhing malinaw at nakalutang ang Activation Modal sa ibabaw ng blur */
#activationModal {
    z-index: 1060 !important;
}

#activationModal .activation-modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   PRODUCT CONFIRMATION & BARCODE MODAL STYLES
   ========================================================================== */
.confirmation-modal-content {
    background: var(--white);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    padding: 1rem 0.5rem;
}

.confirmation-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-teal), var(--primary-navy));
}

.confirm-icon-box {
    width: 52px;
    height: 52px;
    background: rgba(23, 162, 184, 0.12);
    color: var(--accent-teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Live Preview Card */
.barcode-preview-card {
    background: #f8fafc;
    border: 1px dashed rgba(23, 162, 184, 0.4);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.preview-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-navy);
    letter-spacing: 0.5px;
}

.bg-teal-subtle {
    background: rgba(23, 162, 184, 0.12);
    color: #0d6efd;
    color: #0f766e;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

.generated-barcode-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: var(--primary-navy);
    word-break: break-all;
}

.badge-segment {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--primary-navy);
    font-family: monospace;
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.text-teal {
    color: var(--accent-teal) !important;
}

.extra-small {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

.btn-light-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-light-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

@media (max-width: 576px) {
    .generated-barcode-text {
        font-size: 1.35rem;
        letter-spacing: 2px;
    }
}

/* Responsive Modal Subtitle Fix for Mobile */
@media (max-width: 576px) {
    .activation-modal-content .modal-header h4 {
        font-size: 1.1rem;
        word-break: break-word;
    }

    .activation-modal-content .modal-header p {
        font-size: 0.78rem !important;
        white-space: normal !important; /* Overrides single-line truncation on mobile */
        word-break: break-word;
        line-height: 1.35;
    }

    .activation-icon-box {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}